import Vue from 'vue'
import ElementUI from 'element-ui'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(ElementUI)

// 设置 axios 基本配置
axios.defaults.baseURL = 'https://47.93.178.167'
axios.defaults.headers.post['Content-Type'] = 'application/json'
axios.defaults.withCredentials = true // 确保跨域请求时发送凭据（如 cookies）

// 将 axios 实例挂载到 Vue 原型上，这样在组件中可以通过 this.$axios 进行请求
Vue.prototype.$axios = axios

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
